<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-card-body">
            <form class="layui-form" target="hide_form" method="post" action="">
                <div class="layui-form">
                    <table class="layui-table" style="text-align: left;">
                        <tbody>
                        {foreach name="menu_list" item="val"}
                        <tr>
                            <td colspan="2" bgcolor="#e6e6e6">
                                <input type="checkbox" rel="{$val.menu_id}" lay-skin="primary" lay-filter="checkAll">
                                <div class="layui-unselect layui-form-checkbox" lay-skin="primary"><i class="layui-icon"></i></div>
                                <b>{$val.menu_name}</b>
                            </td>
                        </tr>
                        {empty name="val.subclass_count"}
                        <tr>
                            <td colspan="2" bgcolor="#f2f2f2">
                                {foreach name="val.subclass" item="val2" key="key2"}
                                <input type="checkbox" name="menu_id[]" value="{$val2.menu_id}" rel="{$val2.menu_id}" class="child_{$val.menu_id}" lay-filter="checkAll" lay-skin="primary" data-id="{$val.menu_id}" {in name="val2.menu_id" value="$menu_ids"}checked="checked"{/in} >
                                <div class="layui-unselect layui-form-checkbox" lay-skin="primary"><i class="layui-icon"></i></div>
                                {$val2.menu_name}
                                {/foreach}
                            </td>
                        </tr>
                        {else/}
                        {foreach name="val.subclass" item="val2" key="key2"}
                        {eq name="val2.menu_id" value="127"}
                        {eq name="admin_data.role_id" value="1"}
                        <tr>
                            <td bgcolor="#f2f2f2">
                                <input type="checkbox" name="menu_id[]" value="{$val2.menu_id}" rel="{$val2.menu_id}" class="child_{$val.menu_id}" lay-filter="checkAll" lay-skin="primary" data-id="{$val.menu_id}" {in name="val2.menu_id" value="$menu_ids"}checked="checked"{/in} >
                                <div class="layui-unselect layui-form-checkbox" lay-skin="primary"><i class="layui-icon"></i></div>
                                {$val2.menu_name}
                            </td>
                            <td>
                                {foreach name="val2.subclass" item="val3"}
                                <input type="checkbox" name="menu_id[]" value="{$val3.menu_id}" class="child_{$val.menu_id} child_{$val2.menu_id}" lay-skin="primary" data-id="{$val.menu_id}" {in name="val3.menu_id" value="$menu_ids"}checked="checked"{/in} >
                                <div class="layui-unselect layui-form-checkbox" lay-skin="primary"><i class="layui-icon"></i></div>
                                {$val3.menu_name}
                                {/foreach}
                            </td>
                        </tr>
                        {/eq}
                        {else/}
                        <tr>
                            <td bgcolor="#f2f2f2">
                                <input type="checkbox" name="menu_id[]" value="{$val2.menu_id}" rel="{$val2.menu_id}" class="child_{$val.menu_id}" lay-filter="checkAll" lay-skin="primary" data-id="{$val.menu_id}" {in name="val2.menu_id" value="$menu_ids"}checked="checked"{/in} >
                                <div class="layui-unselect layui-form-checkbox" lay-skin="primary"><i class="layui-icon"></i></div>
                                {$val2.menu_name}
                            </td>
                            <td>
                                {foreach name="val2.subclass" item="val3"}
                                <input type="checkbox" name="menu_id[]" value="{$val3.menu_id}" class="child_{$val.menu_id} child_{$val2.menu_id}" lay-skin="primary" data-id="{$val.menu_id}" {in name="val3.menu_id" value="$menu_ids"}checked="checked"{/in} >
                                <div class="layui-unselect layui-form-checkbox" lay-skin="primary"><i class="layui-icon"></i></div>
                                {$val3.menu_name}
                                {/foreach}
                            </td>
                        </tr>
                        {/eq}
                        {/foreach}
                        {/empty}
                        {/foreach}
                        </tbody>
                    </table>
                    <div class="layui-form-item layui-form-text">
                        <div class="layui-input-block">
                            <input type="hidden" name="admin_id" value="{$oldData.admin_id|default=''}">
                            <input type="submit" class="layui-btn layui-btn-normal" value="立即保存" />
                        </div>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>